package com.huan.spring6.iocxml.life;

import com.huan.spring6.iocxml.life.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserTest_Life {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("bean-life.xml");
//        context.start();
        User bean = context.getBean("user", User.class);
        System.out.println("6 bean对象创建完成了，可以使用了");
        context.close();
//        context.destroy();
//        System.out.println(bean.getClass());
    }
}
